window.addEventListener("DOMContentLoaded",function () {

    var btn = document.querySelector('#buttom');
    document.addEventListener('scroll',function () {/*添加事件监听*/
        if(window.scrollY <= 400) {
            btn.style.display = 'none';/*隐藏对象*/
        }else if(window.scrollY >= 400){
            btn.style.display = 'block';/*显示对象*/
        }
    })
});